﻿namespace AspDotNet.Core7.First.Middlewares
{
    public abstract class BaseMiddleware
    {
        protected RequestDelegate NextMiddleware { get; set; }
        public BaseMiddleware(RequestDelegate nextMiddleware)
        {
            this.NextMiddleware = nextMiddleware;
        }

        public virtual async Task Invoke(HttpContext httpContext)
        {
            await NextMiddleware.Invoke(httpContext);
        }
    }
}
